Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snapshot engine: fix #416 (remove the hardcoding) and #433 (add url in metadata) #438

Merged
merged 10 commits into from
May 6, 2022

Conversation

nicolasochem
Copy link
Collaborator

@nicolasochem nicolasochem commented May 4, 2022

This is addressing the little bit of leftover work from the snapshotEngine merge:

snapshotEngine should be totally separate from xtz-shots since anyone can deploy their own. So, all the xtz-shots specific stuff should be hosted on the xtz-shots-website repo, and the snapshotEngine should grab whatever it needs to build the static page.

This is done in this PR. We no longer have a _config.yml in the tezos-k8s repository: we now grab it from xtz-shots-website and append the remote theme config to it with a heredoc.... not super slick but it does the job.

The advantage is that we no longer have to modify config.yml here whenever there is some change in the website metadata (for example, the list of networks on the top right of the page used to say "hangzhounet" despite us having removed it from xtz-shots-website. no longer).

The only leftover references to xtz-shots website are the commented out values in values.yaml (because of course, anyone who would want to deploy a snapshot website should still look into ours to understand how it works)

The only leftover files are Gemfile and Gemfile.lock which I think is ok.

I am also adding full URL to the metadata, this way operators can simply 1. query the metadata 2. parse the url and and 3. download the snapshot

@nicolasochem nicolasochem changed the title WIP fix #416 remove the hardcoding from jekyll generation fix #416 remove the hardcoding from jekyll generation May 5, 2022
@nicolasochem nicolasochem marked this pull request as ready for review May 5, 2022 00:42
@nicolasochem nicolasochem changed the title fix #416 remove the hardcoding from jekyll generation snapshot engine: fix #416 (remove the hardcoding) and #433 (add url in metadata) May 5, 2022
Copy link
Collaborator

@harryttd harryttd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR :)

  • I'm assuming this is tested works?
  • Do we want to make deploying a website optional? That might be too much work right now. I'm not sure.
  • A user may not want a custom domain for their site and might just want to use a raw url to the bucket. Do we want to handle this now?

snapshotEngine/mainJob.yaml Outdated Show resolved Hide resolved
snapshotEngine/zip-and-upload.sh Outdated Show resolved Hide resolved
Comment on lines +566 to +571
cat <<EOF >> _config.yml
remote_theme: ${JEKYLL_REMOTE_THEME_REPOSITORY}
plugins:
- jekyll-remote-theme
EOF

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't leave a comment on line 541 as it isn't part of the diff, but config should be removed from the comment.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry i missed line 575 also. has xtz-shots.io.

Copy link
Collaborator

@harryttd harryttd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i left one more comment but skip if you want

@nicolasochem
Copy link
Collaborator Author

  • I'm assuming this is tested works?

Now yes. It's deployed on ithaca-shots. Here is the new metadata:

nochem@fedora ~/workspace/pulumi-polkadot/charts/plenty-bridge () $ curl -Ls https://ithacanet.xtz-shots.io/rolling-tarball-metadata
{
  "block_hash": "BLiT1qiY15DVM3p23KKNDGrQH3aMS5VdDVipY9dDXjk3QUkUz8Z",
  "block_height": "492980",
  "block_timestamp": "2022-05-06T02:29:30Z",
  "filename": "tezos-ithacanet-rolling-tarball-492980.lz4",
  "url": "https://ithacanet.xtz-shots.io/tezos-ithacanet-rolling-tarball-492980.lz4",
  "sha256": "911222c63243baadca77900df1af650c9bde7a25ffdbb86f518de51fdc67ea53",
  "filesize_bytes": "92478089",
  "filesize": "88M",
  "tezos_version": "6e2037c9 (2022-04-07 12:44:15 +0200) (12.3)",
  "chain_name": "ithacanet",
  "history_mode": "rolling",
  "artifact_type": "tarball"
}
  • Do we want to make deploying a website optional? That might be too much work right now. I'm not sure.
  • A user may not want a custom domain for their site and might just want to use a raw url to the bucket. Do we want to handle this now?

No, let's defer until we are actually trying to deploy without a website. Thanks for approval.

@nicolasochem nicolasochem merged commit 1385bd7 into master May 6, 2022
@harryttd harryttd deleted the snapshot-engine-416 branch May 24, 2022 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants